//
//  Common.swift
//  SHWeibo3
//
//  Created by 余伟康 on 16/7/20.
//  Copyright © 2016年 wangce. All rights reserved.
//

import UIKit

// app主题颜色
let ThemeColor = UIColor.orangeColor()

// 微博app切换根控制器的通知
let WBSwitchRootViewControllerNoti = "WBSwitchRootViewControllerNoti"

// 表情键盘删除按钮通知
let WBEmoticonDeleteButtonNoti = "WBEmoticonDeleteButtonNoti"
// 表情键盘按钮通知
let WBEmoticonButtonsNoti = "WBEmoticonButtonsNoti"

// 微博账号
let wbName = "18457158580"
let wbPasswd = "YU1234"

// 新浪微博相关信息
let APPKEY = "2476142921"
let APPSECRET = "35195efa68f9e85bda1361b29c1ebf06"

// 回调页
let APPREIRECT_URI = "http://www.baidu.com"

// 屏幕的宽高
let SCREENW = UIScreen.mainScreen().bounds.width
let SCREENH = UIScreen.mainScreen().bounds.height

// RGB颜色
func RGB(red: CGFloat, green: CGFloat, blue: CGFloat, alpha: CGFloat = 1) -> UIColor{
    return UIColor(red: red / 255, green: green / 255, blue: blue / 255, alpha: alpha)
}

// 随机颜色
func RandomColor() ->UIColor{
    let r = random()%256
    let g = random()%256
    let b = random()%256
    return RGB(CGFloat(r), green: CGFloat(g), blue: CGFloat(b))
}